<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>

<head>
	<meta charset="UTF-8">
	<title>商品详情-azhuo商城</title>
	<link rel="shortcut icon" href="${pageContext.request.contextPath}/image/logo/xyz.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css">
	<style type="text/css">
		img {
			width: 560px;
			height: 560px;
		}
		
		.amount_box {
			position: absolute;
			width: 185px;
		}
		
		.countTest{
			width:80px;
			float: left;
		}
		
		.count {
			float:right;
		}
		
		.reduce {
			color: #fff;
			display: block;
			text-align: center;
			line-height: 20px;
		    width:17px;
		    height:20px;
		    border: 1px solid rgb(131, 128, 128);
		    float:left;
		    background: #ccc;
		}
		
		.result {
			line-height: 22px;
			height:22px;
			text-align: center;
			width: 65px;
			float:left;
		}
		
		.plus {
			display: block;
			text-align: center;
			width:17px;
		    height:20px;
		    line-height: 20px;
		    border: 1px solid rgb(131, 128, 128);
		    float:left;
		    background: #ccc;
		}
		
		
	</style>
	<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.min.js"></script>
	<jsp:include page="/jsps/js/descJS.jsp"/>
</head>

<body>
	<%-- ----------------------------------- start head ----------------------------------- --%>
	<jsp:include page="/jsps/includes/head.jsp"/>
	<%-- ----------------------------------- end head ----------------------------------- --%>


	<%-- ----------------------------------- start banner_x ----------------------------------- --%>
	<jsp:include page="/jsps/includes/banner_x.jsp"/>
	<%-- ----------------------------------- end banner_x ----------------------------------- --%>


	<%-- ----------------------------------- start 商品详情 ----------------------------------- --%>
	<%-- 商品购买表单 --%>
	<form action="${pageContext.request.contextPath }/CartServlet" method="post">
		<input type="hidden" name="method" value="buyNow"/>
		<input type="hidden" name="gid" id="gid" value="${goods.gid}">
		<div class="jieshao mt20 w">
			<%-- 商品图片 --%>
			<div class="left fl">
				<img src="${pageContext.request.contextPath}/image/goods/${goods.image}">
			</div>
			<%-- 购买信息 --%>
			<div class="right fr">
				<div class="h3 ml20 mt20">商品名称：${goods.gname }</div>
				<div class="jianjie mr40 ml20 mt10">参数：${goods.parameter}</div>
				<div class="jiage ml20 mt10">单价：<span id="price">${goods.price }</span>元</div>
				<div class="xqxq mt20 ml20">
					<div class="top1 mt10" style="height: 30px;">
						<div class="left1 fl">
							<div class="amount_box">
								<div class="countTest">购买数量：</div>
								<%-- 修改购买数量 --%>
								<div class="count">
									<a href="javascript:;" class="reduce" id="reduce">-</a>
									<input type="text" name="count" value="1" class="result" id="result">
									<a href="javascript:;" class="plus" id="plus">+</a>
								</div>
							</div>
						</div>
						<div class="clear"></div>
					</div>
					<div class="bot mt20 ft20 ftbc">总计：<span id="total">${goods.price }</span>元</div>
				</div>
				<div class="xiadan ml20 mt20">
					<input class="jrgwc" type="submit" name="ljgm" value="立即购买" />
					<%-- 异步：加入购物车 --%>
					<input class="jrgwc" type="button" name="jrgwc" id="jrgwc" value="加入购物车" />
				</div>
			</div>
			<div class="clear"></div>
		</div>
	</form>
	<%-- ----------------------------------- start 商品详情 ----------------------------------- --%>

	<%-- ----------------------------------- start footer ----------------------------------- --%>
	<jsp:include page="/jsps/includes/footer.jsp"/>
	<%-- ----------------------------------- end login ----------------------------------- --%>

</body>

</html>